Node.nth_parent

Find the nth parent of node. It goes up until it hits a null parent or max_nth.

struct Node
@nogc nothrow @trusted const
nth_parent
(
in uint max_nth = 2
)

Parameters

max_nth uint

the maximum level to go up.

Return Value

Type: auto

A node. If the given node doesn't have a parent, it returns the node itself. Note: the nth might not be reached if there are no more parents.

Meta